package com.cloudfun.campusshare.common.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * Created by Huqin on 2020/6/8
 */
@Data
@ApiModel("满减活动创建DTO")
public class RebatePromotionCreateDTO extends PromotionDTO {

    @ApiModelProperty("门槛")
    @NotNull(message = "该字段不能为空")
    @Min(value = 0, message = "请输入正确的优惠力度")
    @Max(value = 100, message = "请输入正确的优惠力度")
    private Integer threshold;

    @ApiModelProperty("减免金额")
    @NotNull(message = "该字段不能为空")
    @Min(value = 0, message = "请输入正确的优惠力度")
    @Max(value = 100, message = "请输入正确的优惠力度")
    private Integer rebateAmount;

}
